<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<nav>
    <ul class="pagination pull-left">
        <li>
            <a href="javascript:;" style="padding: 3px 12px;">
                <form class="form-inline" role="form">
                    <div class="">
                        <label class="sr-only" for="pageSize">pageSize</label>
                        <input type='hidden' name="pageSizeNo" id="pageSizeNo" value='${pages.pageSize}'/>
                        <input type="hidden" name="queryCondition" id="queryCondition"
                               value='<c:choose><c:when test="${not empty pages.queryCondition}">${pages.queryCondition}</c:when><c:otherwise>${queryCondition}</c:otherwise></c:choose>' />
                        每页:&nbsp;
                        <select  id="pageSize" style="height: 22px;text-align: center;padding: 0px;" onchange="jumpPageTo('<c:choose><c:when test="${not empty pages.divId}">${pages.divId}</c:when><c:otherwise>${divId}</c:otherwise></c:choose>');">
                            <option value="20" <c:if test="${pages.pageSize==20}">selected="selected"</c:if> >20</option>
                            <option value="50" <c:if test="${pages.pageSize==50}">selected="selected"</c:if>>50</option>
                            <option value="100" <c:if test="${pages.pageSize==100}">selected="selected"</c:if>>100</option>
                        </select>
                    </div>
                </form>
            </a>
        </li>
    </ul>
    <ul class="pagination pull-right">
        <li><a href="javascript:jumpPage(${pages.firstPage}, '<c:choose><c:when test="${not empty pages.divId}">${pages.divId}</c:when><c:otherwise>${divId}</c:otherwise></c:choose>')" aria-label="Previous"><span aria-hidden="true"><i class="fa fa-angle-double-left"></i></span></a></li>
        <li><a href="javascript:jumpPage(${pages.prePage}, '<c:choose><c:when test="${not empty pages.divId}">${pages.divId}</c:when><c:otherwise>${divId}</c:otherwise></c:choose>')" aria-label="Previous"><span aria-hidden="true"><i class="fa fa-angle-left"></i></span></a></li>
        <li>
            <a href="javascript:return false;" style="padding: 3px 12px;">
            <form class="form-inline" role="form">
                <div class="">
                    <label class="sr-only" for="pageNo">pageNo</label>
                    <input type="text" value="${pages.pageNo + 1}" id="pageNo" name="pageNo" style="width: 60px;height: 22px;"/>
                    <button type="button" class="btn btn-theme" style="padding: 1px 5px;" onclick="jumpPageTo('<c:choose><c:when test="${not empty pages.divId}">${pages.divId}</c:when><c:otherwise>${divId}</c:otherwise></c:choose>')">Go</button>
                </div>
            </form>
            </a>
        </li>
        <li>
            <a href="javascript:return false;" aria-label="Previous"><span aria-hidden="true">共 ${pages.totalPages} 页 </span></a>
        </li>
        <li><a href="javascript:jumpPage(${pages.nextPage }, '<c:choose><c:when test="${not empty pages.divId}">${pages.divId}</c:when><c:otherwise>${divId}</c:otherwise></c:choose>')" aria-label="Previous"><span aria-hidden="true"><i class="fa fa-angle-right"></i></span></a></li>
        <li><a href="javascript:jumpPage(${pages.lastPage }, '<c:choose><c:when test="${not empty pages.divId}">${pages.divId}</c:when><c:otherwise>${divId}</c:otherwise></c:choose>')" aria-label="Next"><span aria-hidden="true"><i class="fa fa-angle-double-right"></i></span></a></li>
    </ul>
</nav>
<script type="text/javascript">
    $(function () {
        $("#pageNo").keydown(function (e) {
            if (e.which == 13) {//.which属性判断按下的是哪个键，回车键的键位序号为13
                $("#pageNo").next().click();//触发搜索按钮的点击事件
                return false;
            }
        });
    });
</script>